package com.bjpowernode.query;

import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class TranQuery {

    /**
     * 客户ID
     */
    private Integer customerId;

    /**
     * 交易金额
     */
    @Digits(integer = 12, fraction = 2, message = "交易金额必须是整数或者两位小数")
    private BigDecimal money;

    /**
     * 预计成交日期
     */
    @NotNull(message = "请选择预计成交日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expectedDate;

    /**
     * 交易所处阶段
     */
    @NotNull(message = "请选择交易阶段")
    private Integer stage;

    /**
     * 交易描述
     */
    @Size(min = 5, max = 255, message = "线索描述长度为5-255个字符")
    private String description;

    /**
     * 下次联系时间
     */
    @NotNull(message = "请选择下次跟踪时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date nextContactTime;
}
